package com.wuyou.demo;

import java.io.FileOutputStream;
import java.io.IOException;

public class WriteFileDemo {

    public static void main(String[] args) {

        byte[] data = {0x48, 0x65, 0x6c, 0x6c, 0x6f}; // 二进制数据示例
        String filePath = "example.bin"; // 文件路径

        try (FileOutputStream fos = new FileOutputStream(filePath)) {
            fos.write(data);
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
